package com.ssy.lingxi.logistics.model.request;

import com.ssy.lingxi.logistics.api.dto.request.ProductFreightDetail;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 订单商品请求实体类
 * @author yzc
 * @version 2.0.0
 * @date 2020/9/17
 */
public class OrderProductListRequest implements Serializable {
    private static final long serialVersionUID = -3379031130886864127L;

    /**
     * 收货地址id
     */
    @NotNull(message = "收货地址id不能为空")
    private Long receiverAddressId;

    /**
     * 订单商品集合
     */
    @Valid
//    @NotEmpty(message = "订单商品集合不能为空")
    private List<ProductFreightDetail> orderProductList;

    public Long getReceiverAddressId() {
        return receiverAddressId;
    }

    public void setReceiverAddressId(Long receiverAddressId) {
        this.receiverAddressId = receiverAddressId;
    }

    public List<ProductFreightDetail> getOrderProductList() {
        return orderProductList;
    }

    public void setOrderProductList(List<ProductFreightDetail> orderProductList) {
        this.orderProductList = orderProductList;
    }
}
